package
{
  import asunit.textui.TestRunner;
  import flash.display.Sprite;
  import flash.events.Event;

  /**
   * ...
   * @author Roman Marchenko
   */
  public class MainTest extends Sprite
  {
    public function MainTest():void
    {
      if (stage) init();
      else addEventListener(Event.ADDED_TO_STAGE, init);
    }

    private function init(e:Event = null):void
    {
      removeEventListener(Event.ADDED_TO_STAGE, init);
      // entry point

      //var flashVars: Object = stage.loaderInfo.parameters as Object;

      var unittests:TestRunner = new TestRunner;
      stage.addChild(unittests);
      unittests.start(AllTests, null, TestRunner.SHOW_TRACE);
    }

  }

}